package com.kmust.dream.wanderingdream.comm.pojo;



public enum ReturnMessage implements ReturnMessageEnum{
    GET_SUCCESS(200,"获取数据成功，并且数据有效"),
    GET_FAIL(500,"获取失败"),
    GET_NULL(000,"获取成功，但数据为null"),

    UPDATE_SUCCESS(201,"更新成功"),
    UPDATE_FAIL(501, "更新失败"),

    DELETE_SUCCESS(202,"删除成功"),
    DELETE_FAIL(502,"删除失败"),

    INSERT_SUCCESS(203,"添加成功"),
    INSERT_FAIL(503, "添加失败"),

    PAGE_SUCCESS(204,"分页成功"),
    PAGE_FAIL(504,"分页失败"),

    NO_LOGIN(505,"用户没有登录"),
    NO_AUTH(506,"用户没有权限"),

    DATA_ERROR(507, "数据错误"),

    ORDER_DONE(205,"订单已经完成了");


    //错误码
    public Integer code;
    //提示信息
    public String message;

    //构造函数
    ReturnMessage(Integer code,String message){
        this.code = code;
        this.message = message;
    }


    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
